<template>
    <div>
        <hr>
        <el-button>xxx</el-button>
        <h1>input fileReader</h1>
        <input type="file" accept=".md,.png,.jpg" ref="inp" @change="getFiles">
    </div>
</template>

<script>
export default {
    mounted() {
    console.log(window.FileReader);
  },
  methods: {
    getFiles() {
      console.log(this.$refs.inp.files);
      let fr = new FileReader();
      fr.readAsBinaryString(this.$refs.inp.files[0]);
      fr.onload = () => {
        console.log(fr.result);
      };
    },
  },
}
</script>

<style lang="scss" scoped>
div{
    margin-top: 50px;
}
</style>